Skip to content

fix(editor): keep the Edit clip menu above the timeline and stop tooltips sticking after a click - #1036

Merged
EtienneLescot merged 2 commits into
mainfrom
fix/1006-1016-inspector-rail-menu-tooltips
Oct 6, 2026
Merged

EtienneLescot merged 2 commits into
mainfrom
fix/1006-1016-inspector-rail-menu-tooltips

Conversation

@EtienneLescot

@EtienneLescot EtienneLescot commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Edit clip menu (#1006)

  • The rail's clip list was drawn inside the stage, which clips its overflow: rows past the stage's edge sat under the timeline and could not be clicked.
  • It now opens through the shared Popover (a portal), like the timeline's menus. Escape and an outside click close it.

Tooltips (#1016)

  • The rail and the toolbar use the same Tooltip, and hover opens both. The stuck tooltip came from focus: Radix opens a tooltip on any focus, and focus comes back to a clicked control when the window is reactivated or a dialog returns it to its opener. That tooltip stayed until the next blur, over the controls beside it.
  • TooltipTrigger now opens on focus only when the trigger matches :focus-visible, i.e. keyboard focus, as tooltips.md already says.
  • Add audio shows its key chip, from the addAudio binding.

Related issue

Closes #1006
Part of #1016. Left open:

  • the camera preset, position and frame icons keep a native title (ChoiceRow, f7b96fc). The OS draws it: nothing on keyboard focus, and nothing on macOS while the app is inactive;
  • after a single-jump pointer move, as computer-use makes, Radix waits for the next move before opening a neighbour's tooltip. A hand's several moves open it.

Type of change

  • Bug fix

Release impact

  • Patch

Desktop impact

  • Not platform-specific

Testing

  • New tests: the clip menu renders outside the stage, Escape closes it, no tooltip after focus returns to a clicked control (primitive and rail), the Add audio chip at its default and remapped. Each fails on main.
  • 31 existing tests opened tooltips with a bare focus(), which no longer counts as keyboard focus. They send a Tab first.
  • Headless Chrome, 6 clips at 1280×760: every row is clickable (rows 3 to 6 sat under the timeline). Closing a dialog with the mouse leaves no tooltip; Tab shows it; Escape hides it.
  • Not done: a real OS pointer, the Electron app.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • The Add Audio tooltip now displays the current keyboard shortcut.
    • When multiple clips are available, the clip picker opens in a popover; selecting a clip opens its editor.
  • Bug Fixes

    • Tooltips now appear for keyboard-visible focus, stay hidden after mouse clicks, and close when you press Escape.

The clip list sat inside the stage, which clips what overflows it, so the rows past the stage's edge were under the timeline and no click reached them. It now opens through the shared Popover, in a portal like the timeline's menus. Escape and the outside click come with it, and a picked clip's dialog keeps the focus.
Radix opened a tooltip on every focus, and the focus also comes back to a clicked control without a click: the window is switched back to, a dialog returns it to its opener. That tooltip then stayed open until a blur, over the panel and the next rail buttons, and closed the one under the pointer. Only a :focus-visible focus opens it now. The Add audio button also shows its key chip, read from the live binding.
@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1cc2fef2-f04e-4016-98fa-e0817a4bb22a
📥 Commits

Reviewing files that changed from the base of the PR and between 8f3046c and 5e1b62f.

📒 Files selected for processing (11)
  • src/components/ai-edition/LeftPanel.tooltips.test.tsx
  • src/components/ai-edition/v4/EditorTopBar.test.tsx
  • src/components/ai-edition/v4/FloatingInspector.test.tsx
  • src/components/ai-edition/v4/FloatingInspector.tsx
  • src/components/ai-edition/v4/MediaStage.regenerate.test.tsx
  • src/components/ai-edition/v4/RecStage.test.tsx
  • src/components/ai-edition/v4/V4Timeline.geometry.test.tsx
  • src/components/ai-edition/v4/V4Timeline.tsx
  • src/components/launch/LaunchWindow.test.tsx
  • src/components/ui/tooltip.test.tsx
  • src/components/ui/tooltip.tsx

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The changes update tooltip focus behavior, replace the clip picker menu with a popover, and add the configured Add Audio shortcut to its tooltip. Tests cover keyboard and mouse focus, clip selection and dismissal, and shortcut display.

Changes

Editor Controls

Layer / File(s) Summary
Tooltip focus behavior
src/components/ui/tooltip.tsx, src/components/ui/tooltip.test.tsx, src/components/ai-edition/*tooltips.test.tsx, src/components/ai-edition/v4/*test.tsx, src/components/launch/LaunchWindow.test.tsx
Tooltip triggers now prevent default for focus events that do not match :focus-visible. Tests simulate keyboard focus before checking tooltips and cover Escape dismissal and mouse-click focus behavior.
Clip picker popover
src/components/ai-edition/v4/FloatingInspector.tsx, src/components/ai-edition/v4/FloatingInspector.test.tsx
The multi-clip picker now uses a controlled popover. Selecting a row closes the picker and calls onEditClip; a sole clip opens directly without a menu.
Add Audio shortcut tooltip
src/components/ai-edition/v4/V4Timeline.tsx, src/components/ai-edition/v4/V4Timeline.geometry.test.tsx
The Add Audio tooltip now displays the configured shortcut. Tests cover the default and a remapped binding.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix · Severity of issue fixed: Medium

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant FloatingInspector
  participant Popover
  participant onEditClip
  User->>FloatingInspector: Opens picker when multiple clips exist
  FloatingInspector->>Popover: Opens controlled picker
  User->>Popover: Selects a clip row
  Popover->>FloatingInspector: Closes picker
  FloatingInspector->>onEditClip: Passes selected clip
Loading

Suggested reviewers: my-denia

Merge Risk: ⚪ Minimal · up to 5e1b6

The change keeps the Edit clip menu above the timeline and stops tooltips from sticking after a mouse click. No concrete merge-blocking risk was identified. Real-pointer and Electron testing remain unperformed.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The TooltipTrigger focus behavior changes and the Add audio shortcut chip do not implement or support #1006. The PR description associates these changes with #1016, but #1016 is not a directly linked … Remove these unrelated tooltip and shortcut changes from this PR, or move them to a separate PR for the relevant issue. Keep the clip-picker implementation and its supporting tests.
Docstring Coverage ⚠️ Warning Docstring coverage is 61.54% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 13 functions across 11 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the two main changes: keeping the Edit clip menu above the timeline and preventing tooltips from sticking after a click.
Description check ✅ Passed The description covers the change, related issues, type, release impact, desktop impact, and testing. It also notes testing limitations. The optional screenshots or video section is not included, but …
Linked Issues check ✅ Passed #1006 requires the clip picker to appear above the timeline and keep every row clickable. The change moves the multi-clip picker to the shared Popover portal. The reported tests cover rendering outsid…
Full details: Out of Scope Changes check

Explanation

The TooltipTrigger focus behavior changes and the Add audio shortcut chip do not implement or support #1006. The PR description associates these changes with #1016, but #1016 is not a directly linked target in the supplied issue data.

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@EtienneLescot
EtienneLescot merged commit 2ac20cf into main Oct 6, 2026
19 checks passed
@EtienneLescot
EtienneLescot deleted the fix/1006-1016-inspector-rail-menu-tooltips branch October 6, 2026 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: "Choose a clip to edit" menu renders under the timeline toolbar, so Clip 2 and later can't be clicked

1 participant